<?php
/**
 * 优惠卡发放
 * @copyright (c) Seer All Rights Reserved
 */

require_once './globals.php';

$Student_Model = new Student_Model();
$action = $_POST['action'];

//用户合并初期化
if ($action == '' ) {
	$pwd = '用户合并';
	include View::getView('header');
	require_once View::getView('user/user_merge');
	include View::getView('footer');
	View::output();
}

// 优惠卡发放提交
if ($action == 'commit' ) {
	$student_id = $_POST['student_id'];
	$wx_openid = $_POST['wx_openid'];
	$name = $_POST['name'];
	$tel = $_POST['tel'];

	$mergeData=array(
		"student_id"=>$student_id,
		"wx_openid"=>$wx_openid,
		"name"=>$name,
		"tel"=>$tel,
	);
	var_dump($mergeData);
	$Student_Model->userMerge($mergeData);
	seerDirect("./user_merge.php?active_add=1");
}